﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CitrixSystemVerifier
{
    class RequiredFile
    {
        public RequiredFile()
        {
            m_File = null;
            m_Context = null;
            m_MinimumProductVersion = null;
            m_MaximumProductVersion = null;
            m_Message = null;
        }

        public RequiredFile(string File, string Context, string MinimumProductVersion)
        {
            m_File = File;
            m_Context = Context.Replace('+', ',');
            m_MinimumProductVersion = MinimumProductVersion;
            m_MaximumProductVersion = null;
            m_Message = null;
        }

        public RequiredFile(string File, string Context, string MinimumProductVersion, string MaximumProductVersion)
        {
            m_File = File;
            m_Context = Context.Replace('+', ',');
            m_MinimumProductVersion = MinimumProductVersion;
            m_MaximumProductVersion = MaximumProductVersion;
            m_Message = null;
        }

        public RequiredFile(string File, string Context, string MinimumProductVersion, string MaximumProductVersion, string Message)
        {
            m_File = File;
            m_Context = Context.Replace('+', ',');
            m_MinimumProductVersion = MinimumProductVersion;
            m_MaximumProductVersion = MaximumProductVersion;
            m_Message = Message;
        }

        public bool IsValid()
        {
            if (string.IsNullOrEmpty(m_File))
                return false;
            return true;
        }

        private string m_File;
        public string File
        {
            get { return m_File; }
            set { m_File = value; }
        }

        private string m_MinimumProductVersion;
        public string MinimumProductVersion
        {
            get { return m_MinimumProductVersion; }
            set { m_MinimumProductVersion = value; }
        }

        private string m_MaximumProductVersion;
        public string MaximumProductVersion
        {
            get { return m_MaximumProductVersion; }
            set { m_MaximumProductVersion = value; }
        }

        private string m_Message;
        public string Message
        {
            get { return m_Message; }
            set { m_Message = value; }
        }

        private bool m_Found;
        public bool Found
        {
            get { return m_Found; }
            set { m_Found = value; }
        }

        private string m_Context;
        public string Context
        {
            get { return m_Context; }
            set { m_Context = value.Replace('+', ','); }
        }
    }
}
